Automated Testing-TCL scripting language, automated-tcl scripting language
TCL is a scripting language. It was first called "Tool Command Language" "Tool Command
First, the practice of random numbers1. Randomly generate an integer between the maximum and the minimum valueproc Random {min max} { return [expr round (($max-$min) *rand () +$min)] }2. Generate a random integer that is not duplicated between Num min to maxProc randomunique {min Max num} {Array set arr {}#如果要求生成的数量超过max和min相减的个数 +1If {$num >[expr $max-$min +1]} {Return ""}#当生成的随机数量没有达到要求的数量, call a function that generates a random integerWhile {[Array size arr]Set x [Random $min $max]Set
1. Frog Climb Well for {Set Day 1;set cur 7} {$cur ; incr Day} {}puts $day2. Add 1 to 100Proc Getsum {min {max.}} { 0 for {set I $min} {$i $max} {incr i} { incr sum $ I } return1]3. Returns the average of any number of integersproc Getavg {args} { 0 0 foreach n $args { 1 incr sum $n } set avg [expr $sum/$i] " Number of inputs and $sum, average $avg "2 4 6 8 104. The format of the required input parameter is Xiao Ming 22 Xiao Li 37 Zhang H
. Chars default is a null character.
string Trimleft str ? chars?
Removes the character specified in chars from the beginning of Str. Chars default is a null character.
string TrimRight str. chars?
Removes the character specified in chars from the end of Str. Chars default is a null character.
string Wordend STR Index
Returns the index position of the character in Str after the index position of the word that contains the character.
language extensions provide object-oriented capabilities, including XOTCL, INCR Tcl and so on. In addition Snit expansion itself is written in Tcl.
The most widely used TCL extension is TK. TK provides a graphical user interface GUI for a variety of OS platforms. Even the powerful Python
Automated Testing-TCL scripting language
TCL is a scripting language. It was first called "Tool Command Language" "Tool Command Language", but it does not mean it now, but we still call it TCL
As a scripting language, Tcl is very efficient. Therefore, in actual design, we can use Tcl to complete some tasks that do not have high performance requirements but require a long development cycle to use C, the C language is used only for the part with high execution time requirements.
1. When referencing
not exist. Example:
% Set a 9
9% Lappend a 1 2 39 1 2 3% Set9 1 2 3
2.9 lsearch command
Syntax: lsearch? -Exact? ? -Glob? ? -Regexp? List PatternReturns the index of the first element in the list that matches pattern. If no match is found,-1 is returned. -Exact,-glob,-Regexp is a technology that matches three modes. -Exact indicates exact match.-glob matches string match.The matching method of commands is the same. The following section describes the string commands.-Regexp indicates regular ex
Tags: calculate high-precision modified address EFI struct arithmetic uname table structureSQL queries and SQL functions This chapter aims Understanding Oracle Data Types Understanding Data Definition Languages and data manipulation languages Understanding Transaction Control Languages and Data Control languages Mastering SQL Operators and SQL functions SQL (Structured Query Language)-- Structured Query La
A first open the Web download TCL/TK game source Http://sourceforge.net/projects/tkgames/files/latest/download?source=typ_redirectb The TCL/TK source code file in the compressed package tkHearts-0.90 opened with a text editor, and all the contentCopy to the Init_script string constant in the go source code below Package MainImport "Github.com/nsf/gothic"Const init_script = '#把
TCL programming introduction (5)
Lsort-mode listList.-Mode:-ASCII-Dictionary is similar to acsii, but is case insensitive.-Convert integer to integer for comparison-Convert real to floating point and then compare-Command command: Execute Command for comparison.Open filenameOpen filename accessOpen the file and return a file descriptor.AccessR w a r + W + A +The definition is the same as that in C.
Tags: data revoke back LTE database base program Rollback POI1.DDL (data definition Language) database definition language: DDL gives us the ability to create or delete tables. You can define indexes (keys), specify links between tables, and impose constraints between tables.? Common DDL Statements:–create database (creating new databases)–alter database (modifying databases)–create table (Create new table)
A first open the page http://wiki.tcl.tk/4364"Car Racing in tclupdated 2011-08-25 01:30:05 by RLE"b Copy the TCL/TK code mentioned in the webpage into the Init_script string constant of the go source code as follows Package MainImport "Github.com/nsf/gothic"Const init_script = '#把Tcl/TK source code is copied into this constant. `func Main () { ir : = Gothic. Newinterpreter(init_script)ir. Done}
A first open the page http://wiki.tcl.tk/13601b Copy the first paragraph of the TCL/TK code mentioned in the webpage into the Init_script string constant of the go source code as follows Package MainImport "Github.com/nsf/gothic"Const init_script = '#把Tcl/TK source code is copied into this constant. ` func main () { ir : = Gothic. Newinterpreter(init_script)ir. Done}C in liteide or command li
Package MainImport "Github.com/nsf/gothic"Const INIT_SCRIPT = 'catch {destroy. Clock Errorswindow}Set w [toplevel. Clock]WM withdraw.WM title $::w "Clock"TK appname "Clock"WM Overrideredirect $::w 1WM Geometry $::w "+690+0"Set:: Time 12:00Label $::w.digital-textvar:: Time-font "Arial"-FG white-bg #000000Pack $::w.digitalBind. `Func Main () {IR: = Gothic. Newinterpreter (Init_script)}This is a box of TCL/TK code, and currently do not know how to bind t
TCL programming introduction (6)
TCL namespace Create and manipulate commands and variables ). Introduction: a namespace is a collection of commands and variables, the namespace encapsulation ensures that they do not affect other namespace variables and commands. TCL always maintains a global nam
TCL programming introduction (III)
TCL built-in commandsBuilt-in commandsTCL provides the built-in functions described below.... Indicates that the parameters are not specific:APPEND command:Append varname ValueAppend varname value...Append the large number of values to the end of varname. If the variable does not exist, a new one is created.Example:Set
the Tiobe ranking is still 100, in 2016 years a year from 169th to 137.
So who will spend the annual programming language of 2017? We predict that C + +, Swift, Julia and Typescript will all be strong contenders for this position.
TOP20 List of programming languages
The following is the 第21-50位 programming
Edit @ 2011-4-27By Frank: 1. Added illustrations; 2. modified the words and statements of the article; 3. unified the CSS style.
Latest address in http://www.ajaxjs.com/popular.htm
-----------------------------
I translated articles in the early 07 years when I was studying JS and sent a mail to DC. DC added my link. Hey hey.
Author: Douglas crockford 08.3.3 Original article: http://javascript.crockford.com/popular.html
Jean sammet wrote the book "computer
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.